<template>
  <div class="ele-body ele-body-card">
    <!-- 顶部卡片 -->
    <a-card
      :bordered="true"
      :body-style="{padding: '20px'}">
      <div class="ele-cell workplace-user-card">
        <div class="ele-cell-content ele-cell">
          <a-progress :width="70" type="circle" :percent="100" :format="() => '柜子'" />
          <div class="ele-cell-content">
            <h4 class="ele-elip">柜子号：{{data.recordId}}</h4>
            <div class="ele-elip ele-text-secondary">
              <clock-circle-outlined/>
              <em>{{data.deviceTime}}</em>
            </div>
          </div>
        </div>
      </div>
    </a-card>

    <a-card
      :bordered="true"
      :body-style="{padding: '20px'}">
      <a-form
        ref="form"
        :model="paramForm"
        :rules="rules"
        :label-col="{ md: { span: 11 }, sm: { span: 24 } }"
        :wrapper-col="{ md: { span: 13 }, sm: { span: 24 } }"
        @submit="saveConfigToCmdQueue"
      >
        <a-alert message="喷淋数据单位秒，范围从0到32767" type="warning" />
        <a-divider orientation="left"><a-tooltip color='orange' title='范围从0到32767'>ABCDEF6组喷淋模式设置</a-tooltip></a-divider>
        <a-row :gutter="8">
          <a-col :md="4" :sm="24" :xs="24">
            <a-form-item label="喷淋数据A" />
            <a-form-item label="喷淋数据B" />
            <a-form-item label="喷淋数据C" />
            <a-form-item label="喷淋数据D" />
            <a-form-item label="喷淋数据E" />
            <a-form-item label="喷淋数据F" />
          </a-col>
          <a-col :md="10" :sm="24" :xs="24">
            <a-form-item label="动作时长(秒):" name="A_ACTION">
              <a-input v-model:value="paramForm.sprayModelData.A_ACTION" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="动作时长(秒):" name="B_ACTION">
              <a-input v-model:value="paramForm.sprayModelData.B_ACTION" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="动作时长(秒):" name="C_ACTION">
              <a-input v-model:value="paramForm.sprayModelData.C_ACTION" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="动作时长(秒):" name="D_ACTION">
              <a-input v-model:value="paramForm.sprayModelData.D_ACTION" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="动作时长(秒):" name="E_ACTION">
              <a-input v-model:value="paramForm.sprayModelData.E_ACTION" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="动作时长(秒):" name="F_ACTION">
              <a-input v-model:value="paramForm.sprayModelData.F_ACTION" placeholder="单位s" allow-clear />
            </a-form-item>
          </a-col>

          <a-col :md="10" :sm="24" :xs="24">
            <a-form-item label="停止时长(秒):" name="A_STOP">
              <a-input v-model:value="paramForm.sprayModelData.A_STOP" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="停止时长(秒):" name="B_STOP">
              <a-input v-model:value="paramForm.sprayModelData.B_STOP" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="停止时长(秒):" name="C_STOP">
              <a-input v-model:value="paramForm.sprayModelData.C_STOP" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="停止时长(秒):" name="D_STOP">
              <a-input v-model:value="paramForm.sprayModelData.D_STOP" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="停止时长(秒):" name="E_STOP">
              <a-input v-model:value="paramForm.sprayModelData.E_STOP" placeholder="单位s" allow-clear />
            </a-form-item>
            <a-form-item label="停止时长(秒):" name="F_STOP">
              <a-input v-model:value="paramForm.sprayModelData.F_STOP" placeholder="单位s" allow-clear />
            </a-form-item>
          </a-col>
        </a-row>
        <!---------------- 时间设置----------->
        <a-alert message="喷淋时间可设置范围是00:00-24:00,区域是必须选择的，开始时间必须小于结束时间" type="warning" />
        <a-divider orientation="left"><a-tooltip color='orange' title='假设要设置全天时间里面，5s喷一次的固定喷淋时序。可以值设置时间段一开始结束时间是全天，其他不设置，然后配合运行时长和停止时长模式'>喷淋时间设置</a-tooltip></a-divider>
        <a-row :gutter="8">
          <a-col :md="6" :sm="24" :xs="24">
            <a-form-item label="时间段一开始时间:" name="TIME1_START">
              <a-time-picker v-model:value="paramForm.TIME1_START" format="HH:mm" @change="selectTime1Start"  allow-clear  />
            </a-form-item>
            <a-form-item label="时间段二开始时间:" name="TIME2_START">
              <a-time-picker v-model:value="paramForm.TIME2_START" format="HH:mm" @change="selectTime2Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段三开始时间:" name="TIME3_START">
              <a-time-picker v-model:value="paramForm.TIME3_START" format="HH:mm" @change="selectTime3Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段四开始时间:" name="TIME4_START">
              <a-time-picker v-model:value="paramForm.TIME4_START" format="HH:mm" @change="selectTime4Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段五开始时间:" name="TIME5_START">
              <a-time-picker v-model:value="paramForm.TIME5_START" format="HH:mm" @change="selectTime5Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段六开始时间:" name="TIME6_START">
              <a-time-picker v-model:value="paramForm.TIME6_START" format="HH:mm" @change="selectTime6Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段七开始时间:" name="TIME7_START">
              <a-time-picker v-model:value="paramForm.TIME7_START" format="HH:mm" @change="selectTime7Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段八开始时间:" name="TIME8_START">
              <a-time-picker v-model:value="paramForm.TIME8_START" format="HH:mm" @change="selectTime8Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段九开始时间:" name="TIME9_START">
              <a-time-picker v-model:value="paramForm.TIME9_START" format="HH:mm" @change="selectTime9Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段十开始时间:" name="TIME10_START">
              <a-time-picker v-model:value="paramForm.TIME10_START" format="HH:mm" @change="selectTime10Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段十一开始时间:" name="TIME11_START">
              <a-time-picker v-model:value="paramForm.TIME11_START" format="HH:mm" @change="selectTime11Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段十二开始时间:" name="TIME12_START">
              <a-time-picker v-model:value="paramForm.TIME12_START" format="HH:mm" @change="selectTime12Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段十三开始时间:" name="TIME13_START">
              <a-time-picker v-model:value="paramForm.TIME13_START" format="HH:mm" @change="selectTime13Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段十四开始时间:" name="TIME14_START">
              <a-time-picker v-model:value="paramForm.TIME14_START" format="HH:mm" @change="selectTime14Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段十五开始时间:" name="TIME15_START">
              <a-time-picker v-model:value="paramForm.TIME15_START" format="HH:mm" @change="selectTime15Start" allow-clear />
            </a-form-item>
            <a-form-item label="时间段十六开始时间:" name="TIME16_START">
              <a-time-picker v-model:value="paramForm.TIME16_START" format="HH:mm" @change="selectTime16Start" allow-clear />
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="24" :xs="24">
            <a-form-item label="结束时间(截止24:00):" name="TIME1_STOP">
              <time24-select :value="paramForm.TIME1_OVER" @modify="selectTime1Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME2_STOP">
              <time24-select :value="paramForm.TIME2_OVER" @modify="selectTime2Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME3_STOP">
              <time24-select :value="paramForm.TIME3_OVER" @modify="selectTime3Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME4_STOP">
              <time24-select :value="paramForm.TIME4_OVER" @modify="selectTime4Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME5_STOP">
              <time24-select :value="paramForm.TIME5_OVER" @modify="selectTime5Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME6_STOP">
              <time24-select :value="paramForm.TIME6_OVER" @modify="selectTime6Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME7_STOP">
              <time24-select :value="paramForm.TIME7_OVER" @modify="selectTime7Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME8_STOP">
              <time24-select :value="paramForm.TIME8_OVER" @modify="selectTime8Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME9_STOP">
              <time24-select :value="paramForm.TIME9_OVER" @modify="selectTime9Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME10_STOP">
              <time24-select :value="paramForm.TIME10_OVER" @modify="selectTime10Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME11_STOP">
              <time24-select :value="paramForm.TIME11_OVER" @modify="selectTime11Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME12_STOP">
              <time24-select :value="paramForm.TIME12_OVER" @modify="selectTime12Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME13_STOP">
              <time24-select :value="paramForm.TIME13_OVER" @modify="selectTime13Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME14_STOP">
              <time24-select :value="paramForm.TIME14_OVER" @modify="selectTime14Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME15_STOP">
              <time24-select :value="paramForm.TIME15_OVER" @modify="selectTime15Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="TIME16_STOP">
              <time24-select :value="paramForm.TIME16_OVER" @modify="selectTime16Over" />
            </a-form-item>
          </a-col>

          <a-col :md="4" :sm="24" :xs="24">
            <a-form-item label="喷淋数据:" name="TIME1_VALID">
              <a-select v-model:value="timeConfForm.TIME1_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME2_VALID">
              <a-select v-model:value="timeConfForm.TIME2_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME3_VALID">
              <a-select v-model:value="timeConfForm.TIME3_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME4_VALID">
              <a-select v-model:value="timeConfForm.TIME4_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME5_VALID">
              <a-select v-model:value="timeConfForm.TIME5_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME6_VALID">
              <a-select v-model:value="timeConfForm.TIME6_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME7_VALID">
              <a-select v-model:value="timeConfForm.TIME7_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME8_VALID">
              <a-select v-model:value="timeConfForm.TIME8_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME9_VALID">
              <a-select v-model:value="timeConfForm.TIME9_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME10_VALID">
              <a-select v-model:value="timeConfForm.TIME10_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME11_VALID">
              <a-select v-model:value="timeConfForm.TIME11_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME12_VALID">
              <a-select v-model:value="timeConfForm.TIME12_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME13_VALID">
              <a-select v-model:value="timeConfForm.TIME13_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME14_VALID">
              <a-select v-model:value="timeConfForm.TIME14_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME15_VALID">
              <a-select v-model:value="timeConfForm.TIME15_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TIME16_VALID">
              <a-select v-model:value="timeConfForm.TIME16_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option :value="7">温控模式</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>

          <a-col class='regionclass' :md="8" :sm="24" :xs="24" >
            <a-form-item label="区域:" name="TIME1_REGION">
              <a-select v-model:value="paramForm.TIME1_REGION_ARR" mode="multiple" @change="time1RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME2_REGION">
              <a-select v-model:value="paramForm.TIME2_REGION_ARR" mode="multiple" @change="time2RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME3_REGION">
              <a-select v-model:value="paramForm.TIME3_REGION_ARR" mode="multiple" @change="time3RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME4_REGION">
              <a-select v-model:value="paramForm.TIME4_REGION_ARR" mode="multiple" @change="time4RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME5_REGION">
              <a-select v-model:value="paramForm.TIME5_REGION_ARR" mode="multiple" @change="time5RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME6_REGION">
              <a-select v-model:value="paramForm.TIME6_REGION_ARR" mode="multiple" @change="time6RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME7_REGION">
              <a-select v-model:value="paramForm.TIME7_REGION_ARR" mode="multiple" @change="time7RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME8_REGION">
              <a-select v-model:value="paramForm.TIME8_REGION_ARR" mode="multiple" @change="time8RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME9_REGION">
              <a-select v-model:value="paramForm.TIME9_REGION_ARR" mode="multiple" @change="time9RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME10_REGION">
              <a-select v-model:value="paramForm.TIME10_REGION_ARR" mode="multiple" @change="time10RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME11_REGION">
              <a-select v-model:value="paramForm.TIME11_REGION_ARR" mode="multiple" @change="time11RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME12_REGION">
              <a-select v-model:value="paramForm.TIME12_REGION_ARR" mode="multiple" @change="time12RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME13_REGION">
              <a-select v-model:value="paramForm.TIME13_REGION_ARR" mode="multiple" @change="time13RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME14_REGION">
              <a-select v-model:value="paramForm.TIME14_REGION_ARR" mode="multiple" @change="time14RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME15_REGION">
              <a-select v-model:value="paramForm.TIME15_REGION_ARR" mode="multiple" @change="time15RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="区域:" name="TIME16_REGION">
              <a-select v-model:value="paramForm.TIME16_REGION_ARR" mode="multiple" @change="time16RegionChange">
                <a-select-option :value="1">1区</a-select-option>
                <a-select-option :value="2">2区</a-select-option>
                <a-select-option :value="4">3区</a-select-option>
                <a-select-option :value="8">4区</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>

        </a-row>
        <a-alert message="温度区间可设置范围-500到900，精确到小数点后1位，温度上限必须大于温度下限" type="warning" />
        <a-divider orientation="left"><a-tooltip color='orange' title="温控模式是基于时间模式基础上叠加温度的控制，在设置时间之后，可以选择是否加上温度条件的控制">温度设置</a-tooltip></a-divider>

        <a-row :gutter="8">
          <a-col :md="8" :sm="24" :xs="24">
            <a-form-item label="温度上限1(℃):" name="TEMP1_RANGE_HIGH">
              <a-input v-model:value="paramForm.tempModelConf.TEMP1_RANGE_HIGH" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度上限2(℃):" name="TEMP2_RANGE_HIGH">
              <a-input v-model:value="paramForm.tempModelConf.TEMP2_RANGE_HIGH" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度上限3(℃):" name="TEMP3_RANGE_HIGH">
              <a-input v-model:value="paramForm.tempModelConf.TEMP3_RANGE_HIGH" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度上限4(℃):" name="TEMP4_RANGE_HIGH">
              <a-input v-model:value="paramForm.tempModelConf.TEMP4_RANGE_HIGH" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度上限5(℃):" name="TEMP5_RANGE_HIGH">
              <a-input v-model:value="paramForm.tempModelConf.TEMP5_RANGE_HIGH" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度上限6(℃):" name="TEMP6_RANGE_HIGH">
              <a-input v-model:value="paramForm.tempModelConf.TEMP6_RANGE_HIGH" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
          </a-col>
          <a-col :md="8" :sm="24" :xs="24">
            <a-form-item label="温度下限1(℃):" name="TEMP1_RANGE_LOW">
              <a-input v-model:value="paramForm.tempModelConf.TEMP1_RANGE_LOW" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度下限2(℃):" name="TEMP2_RANGE_LOW">
              <a-input v-model:value="paramForm.tempModelConf.TEMP2_RANGE_LOW" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度下限3(℃):" name="TEMP3_RANGE_LOW">
              <a-input v-model:value="paramForm.tempModelConf.TEMP3_RANGE_LOW" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度下限4(℃):" name="TEMP4_RANGE_LOW">
              <a-input v-model:value="paramForm.tempModelConf.TEMP4_RANGE_LOW" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度下限5(℃):" name="TEMP5_RANGE_LOW">
              <a-input v-model:value="paramForm.tempModelConf.TEMP5_RANGE_LOW" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
            <a-form-item label="温度下限6(℃):" name="TEMP6_RANGE_LOW">
              <a-input v-model:value="paramForm.tempModelConf.TEMP6_RANGE_LOW" placeholder="精确到小数点后1位" allow-clear />
            </a-form-item>
          </a-col>

          <a-col :md="8" :sm="24" :xs="24">
            <a-form-item label="喷淋数据:" name="TEMP1_VALID">
              <a-select v-model:value="paramForm.tempModelConf.TEMP1_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="7">超级模式一(脉冲模式)</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="8">超级模式二(恢复常规喷淋模式)</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TEMP2_VALID">
              <a-select v-model:value="paramForm.tempModelConf.TEMP2_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="7">超级模式一(脉冲模式)</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="8">超级模式二(恢复常规喷淋模式)</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TEMP3_VALID">
              <a-select v-model:value="paramForm.tempModelConf.TEMP3_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="7">超级模式一(脉冲模式)</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="8">超级模式二(恢复常规喷淋模式)</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TEMP4_VALID">
              <a-select v-model:value="paramForm.tempModelConf.TEMP4_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="7">超级模式一(脉冲模式)</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="8">超级模式二(恢复常规喷淋模式)</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TEMP5_VALID">
              <a-select v-model:value="paramForm.tempModelConf.TEMP5_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="7">超级模式一(脉冲模式)</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="8">超级模式二(恢复常规喷淋模式)</a-select-option>
              </a-select>
            </a-form-item>
            <a-form-item label="喷淋数据:" name="TEMP6_VALID">
              <a-select v-model:value="paramForm.tempModelConf.TEMP6_VALID">
                <a-select-option :value="0">无效</a-select-option>
                <a-select-option :value="1">喷淋数据A</a-select-option>
                <a-select-option :value="2">喷淋数据B</a-select-option>
                <a-select-option :value="3">喷淋数据C</a-select-option>
                <a-select-option :value="4">喷淋数据D</a-select-option>
                <a-select-option :value="5">喷淋数据E</a-select-option>
                <a-select-option :value="6">喷淋数据F</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="7">超级模式一(脉冲模式)</a-select-option>
                <a-select-option v-if="data.clientInnerType == 3" :value="8">超级模式二(恢复常规喷淋模式)</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
        </a-row>

        <!---------------- 超级模式3使用的时间段----------->
        <a-alert v-if="data.clientInnerType == 3" message="喷淋超级模式3(喷淋房模式)使用的时间段可设置范围是00:00-24:00，开始时间必须小于结束时间" type="warning" />
        <a-divider v-if="data.clientInnerType == 3" orientation="left">喷淋超级模式3(喷淋房模式)使用的时间段</a-divider>
        <a-row :gutter="8" v-if="data.clientInnerType == 3">
          <a-col :md="12" :sm="24" :xs="24">
            <a-form-item label="超级模式3(喷淋房模式)时间段一开始时间:" name="SU2_TIME1_START">
              <a-time-picker v-model:value="paramForm.SU2_TIME1_START" format="HH:mm" @change="selectSU2Time1Start" allow-clear />
            </a-form-item>
            <a-form-item label="超级模式3(喷淋房模式)时间段二开始时间:" name="SU2_TIME2_START">
              <a-time-picker v-model:value="paramForm.SU2_TIME2_START" format="HH:mm" @change="selectSU2Time2Start" allow-clear />
            </a-form-item>
            <a-form-item label="超级模式3(喷淋房模式)时间段三开始时间:" name="SU2_TIME3_START">
              <a-time-picker v-model:value="paramForm.SU2_TIME3_START" format="HH:mm" @change="selectSU2Time3Start" allow-clear />
            </a-form-item>
            <a-form-item label="超级模式3(喷淋房模式)时间段四开始时间:" name="SU2_TIME4_START">
              <a-time-picker v-model:value="paramForm.SU2_TIME4_START" format="HH:mm" @change="selectSU2Time4Start" allow-clear />
            </a-form-item>
          </a-col>
          <a-col :md="7" :sm="24" :xs="24">
            <a-form-item label="结束时间(截止24:00):" name="SU2_TIME1_OVER">
              <time24-select :value="paramForm.SU2_TIME1_OVER" @modify="selectSU2Time1Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="SU2_TIME2_OVER">
              <time24-select :value="paramForm.SU2_TIME2_OVER" @modify="selectSU2Time2Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="SU2_TIME3_OVER">
              <time24-select :value="paramForm.SU2_TIME3_OVER" @modify="selectSU2Time3Over" />
            </a-form-item>
            <a-form-item label="结束时间(截止24:00):" name="SU2_TIME4_OVER">
              <time24-select :value="paramForm.SU2_TIME4_OVER" @modify="selectSU2Time4Over" />
            </a-form-item>
          </a-col>
          <a-col :md="5" :sm="24" :xs="24">
          </a-col>
        </a-row>


        <a-row>
          <a-col :md="17" :sm="24" :xs="24">

          </a-col>
          <a-col :md="2" :sm="24" :xs="24">
            <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
              <a-button v-permission="['PROPERTY_DEVICELIST_MGR_SPRAYCTOCABINET_CONFIG_SPRAY_EDIT_BUTTON']" type="primary" html-type="submit" :loading='iconLoading'>
                保存并同步
              </a-button>
            </a-form-item>
          </a-col>
          <a-col :md="1" :sm="24" :xs="24">

          </a-col>
          <a-col :md='2' :sm='24' :xs='24'>
            <a-form-item :wrapper-col='{ span: 12, offset: 5 }'>
              <a-button v-permission="['PROPERTY_DEVICELIST_MGR_SPRAYCTOCABINET_READ_CONFIG_BUTTON']" type='primary' html-type='button' @click='getParamsActionToCmdQueue' :loading='getParamsLoading'>
                读取设备的配置
              </a-button>
            </a-form-item>
          </a-col>
          <a-col :md="2" :sm="24" :xs="24">

          </a-col>
        </a-row>
      </a-form>
    </a-card>
  </div>
</template>

<script>
import dayjs from 'dayjs';
import ClockCircleOutlined from '@ant-design/icons-vue/lib/icons/ClockCircleOutlined';
import { DeviceSprayConfigApi } from '@/api/property/DeviceSprayConfigApi';
import Time24Select from '@/components/Time24Select/Time24Select.vue';
import { message } from 'ant-design-vue';
import {DeviceCommandDownQueueApi} from "@/api/property/DeviceCommandDownQueueApi";
export default {
  name: 'DeviceSprayCtocabinetConfigSprayData',
  components: {
    ClockCircleOutlined,
    Time24Select
  },
  props: {
    data: Object
  },
  async mounted() {
  },
  async created() {
    await this.init()
  },
  data() {
    return {
      form : {},
      paramForm : {},
      timeConfForm : {},
      super3TimeConfForm : {},
      rules: {

      },
      iconLoading: false,
      loadTimer: '',

      getParamsLoading : false,
      getParamsTimer : ''
    };
  },
  methods: {
    parse1248(region) {
      let arr = new Array();
      if (!region) {
        return arr;
      }
      if (region & 1 == 1) {
        arr.push(1);
      }
      if (region >> 1 & 1 == 1) {
        arr.push(2);
      }
      if (region >> 2 & 1 == 1) {
        arr.push(4);
      }
      if (region >> 3 & 1 == 1) {
        arr.push(8);
      }
      return arr;
    },
    async init() {
      this.paramForm.sprayModelData = {};
      this.paramForm.tempModelConf = {};
      let _conf = await DeviceSprayConfigApi.detail({"recordId" : this.data.recordId});
      if (_conf) {
        this.form = _conf;
        //{"A_STOP":30,"A_ACTION":20,"B_STOP":280,"B_ACTION":10,"C_STOP":400,"C_ACTION":10,"D_STOP":400,"D_ACTION":10,"E_STOP":400,"E_ACTION":10,"F_STOP":400,"F_ACTION":10}
        this.paramForm.sprayModelData = _conf.sprayModelData ? ((JSON.parse(_conf.sprayModelData)) || {}) : {};
        let timeConf = Object.assign({}, (_conf.timeModelConf ? (JSON.parse(_conf.timeModelConf) || {}) : {}));
        this.timeConfForm = timeConf;
        if (timeConf) {
          //{"TIME1_START_HOUR":9,"TIME1_START_MIN":30,"TIME1_OVER_HOUR":23,"TIME1_OVER_MIN":59,"TIME1_VALID":7,"TIME2_START_HOUR":0,"TIME2_START_MIN":0,"TIME2_OVER_HOUR":24,"TIME2_OVER_MIN":0,"TIME2_VALID":0,"TIME3_START_HOUR":0,"TIME3_START_MIN":0,"TIME3_OVER_HOUR":23,"TIME3_OVER_MIN":0,"TIME3_VALID":0,"TIME4_START_HOUR":0,"TIME4_START_MIN":0,"TIME5_OVER_HOUR":24,"TIME5_OVER_MIN":0,"TIME5_VALID":0,"TIME6_START_HOUR":0,"TIME6_START_MIN":0,"TIME6_OVER_HOUR":24,"TIME6_OVER_MIN":0,"TIME6_VALID":0,"TIME7_START_HOUR":0,"TIME7_START_MIN":0,"TIME7_OVER_HOUR":24,"TIME7_OVER_MIN":0,"TIME7_VALID":0,"TIME8_START_HOUR":0,"TIME8_START_MIN":0,"TIME8_OVER_HOUR":24,"TIME8_OVER_MIN":0,"TIME8_VALID":0}
          let _TIME1_START_HOUR = timeConf.TIME1_START_HOUR ? Number(timeConf.TIME1_START_HOUR) : 0,
            _TIME1_START_MIN = timeConf.TIME1_START_MIN ? Number(timeConf.TIME1_START_MIN) : 0,
            _TIME1_OVER_HOUR = timeConf.TIME1_OVER_HOUR ? Number(timeConf.TIME1_OVER_HOUR) : 0,
            _TIME1_OVER_MIN = timeConf.TIME1_OVER_MIN ? Number(timeConf.TIME1_OVER_MIN) : 0;
          this.paramForm.TIME1_START= dayjs( ((_TIME1_START_HOUR < 10 ? ("0" + _TIME1_START_HOUR) : _TIME1_START_HOUR) + ":" + (_TIME1_START_MIN < 10 ? ("0" + _TIME1_START_MIN) : _TIME1_START_MIN)), 'HH:mm');
          this.paramForm.TIME1_OVER = [_TIME1_OVER_HOUR, _TIME1_OVER_MIN];
          this.paramForm.TIME1_REGION_ARR = this.parse1248(timeConf.TIME1_REGION ? Number(timeConf.TIME1_REGION) : 0);
          this.timeConfForm.TIME1_VALID = timeConf.TIME1_VALID ? Number(timeConf.TIME1_VALID) : 0;

          let _TIME2_START_HOUR = timeConf.TIME2_START_HOUR ? Number(timeConf.TIME2_START_HOUR) : 0,
            _TIME2_START_MIN = timeConf.TIME2_START_MIN ? Number(timeConf.TIME2_START_MIN) : 0,
            _TIME2_OVER_HOUR = timeConf.TIME2_OVER_HOUR ? Number(timeConf.TIME2_OVER_HOUR) : 0,
            _TIME2_OVER_MIN = timeConf.TIME2_OVER_MIN ? Number(timeConf.TIME2_OVER_MIN) : 0;
          this.paramForm.TIME2_START = dayjs(((_TIME2_START_HOUR < 10 ? ("0" + _TIME2_START_HOUR) : _TIME2_START_HOUR) + ":" +  (_TIME2_START_MIN < 10 ? ("0" + _TIME2_START_MIN) : _TIME2_START_MIN)), 'HH:mm');
          this.paramForm.TIME2_OVER = [_TIME2_OVER_HOUR, _TIME2_OVER_MIN];
          this.paramForm.TIME2_REGION_ARR = this.parse1248(timeConf.TIME2_REGION ? Number(timeConf.TIME2_REGION) : 0);
          this.timeConfForm.TIME2_VALID = timeConf.TIME2_VALID ? Number(timeConf.TIME2_VALID) : 0;

          let _TIME3_START_HOUR = timeConf.TIME3_START_HOUR ? Number(timeConf.TIME3_START_HOUR) : 0,
            _TIME3_START_MIN = timeConf.TIME3_START_MIN ? Number(timeConf.TIME3_START_MIN) : 0,
            _TIME3_OVER_HOUR = timeConf.TIME3_OVER_HOUR ? Number(timeConf.TIME3_OVER_HOUR) : 0,
            _TIME3_OVER_MIN= timeConf.TIME3_OVER_MIN ? Number(timeConf.TIME3_OVER_MIN) : 0;
          this.paramForm.TIME3_START = dayjs(((_TIME3_START_HOUR < 10 ? ("0" + _TIME3_START_HOUR) : _TIME3_START_HOUR) + ":" +  (_TIME3_START_MIN < 10 ? ("0" + _TIME3_START_MIN) : _TIME3_START_MIN)), 'HH:mm');
          this.paramForm.TIME3_OVER = [_TIME3_OVER_HOUR, _TIME3_OVER_MIN];
          this.paramForm.TIME3_REGION_ARR = this.parse1248(timeConf.TIME3_REGION ? Number(timeConf.TIME3_REGION) : 0);
          this.timeConfForm.TIME3_VALID = timeConf.TIME3_VALID ? Number(timeConf.TIME3_VALID) : 0;


          let _TIME4_START_HOUR = timeConf.TIME4_START_HOUR ? Number(timeConf.TIME4_START_HOUR) : 0,
            _TIME4_START_MIN = timeConf.TIME4_START_MIN ? Number(timeConf.TIME4_START_MIN) : 0,
            _TIME4_OVER_HOUR = timeConf.TIME4_OVER_HOUR ? Number(timeConf.TIME4_OVER_HOUR) : 0,
            _TIME4_OVER_MIN = timeConf.TIME4_OVER_MIN ? Number(timeConf.TIME4_OVER_MIN) : 0;
          this.paramForm.TIME4_START = dayjs(((_TIME4_START_HOUR < 10 ? ("0" + _TIME4_START_HOUR) : _TIME4_START_HOUR) + ":" +  (_TIME4_START_MIN < 10 ? ("0" + _TIME4_START_MIN) : _TIME4_START_MIN)), 'HH:mm');
          this.paramForm.TIME4_OVER = [_TIME4_OVER_HOUR,_TIME4_OVER_MIN ];
          this.paramForm.TIME4_REGION_ARR = this.parse1248(timeConf.TIME4_REGION ? Number(timeConf.TIME4_REGION) : 0);
          this.timeConfForm.TIME4_VALID = timeConf.TIME4_VALID ? Number(timeConf.TIME4_VALID) : 0;

          let _TIME5_START_HOUR = timeConf.TIME5_START_HOUR ? Number(timeConf.TIME5_START_HOUR) : 0,
            _TIME5_START_MIN = timeConf.TIME5_START_MIN ? Number(timeConf.TIME5_START_MIN) : 0,
            _TIME5_OVER_HOUR = timeConf.TIME5_OVER_HOUR ? Number(timeConf.TIME5_OVER_HOUR) : 0,
            _TIME5_OVER_MIN = timeConf.TIME5_OVER_MIN ? Number(timeConf.TIME5_OVER_MIN) : 0;
          this.paramForm.TIME5_START = dayjs(((_TIME5_START_HOUR < 10 ? ("0" + _TIME5_START_HOUR) : _TIME5_START_HOUR) + ":" +  (_TIME5_START_MIN < 10 ? ("0" + _TIME5_START_MIN) : _TIME5_START_MIN)), 'HH:mm');
          this.paramForm.TIME5_OVER = [_TIME5_OVER_HOUR, _TIME5_OVER_MIN];
          this.paramForm.TIME5_REGION_ARR = this.parse1248(timeConf.TIME5_REGION ? Number(timeConf.TIME5_REGION) : 0);
          this.timeConfForm.TIME5_VALID = timeConf.TIME5_VALID ? Number(timeConf.TIME5_VALID) : 0;

          let _TIME6_START_HOUR = timeConf.TIME6_START_HOUR ? Number(timeConf.TIME6_START_HOUR) : 0,
            _TIME6_START_MIN = timeConf.TIME6_START_MIN ? Number(timeConf.TIME6_START_MIN) : 0,
            _TIME6_OVER_HOUR = timeConf.TIME6_OVER_HOUR ? Number(timeConf.TIME6_OVER_HOUR) : 0,
            _TIME6_OVER_MIN = timeConf.TIME6_OVER_MIN ? Number(timeConf.TIME6_OVER_MIN) : 0;
          this.paramForm.TIME6_START = dayjs(((_TIME6_START_HOUR < 10 ? ("0" +_TIME6_START_HOUR) : _TIME6_START_HOUR) + ":" +  (_TIME6_START_MIN < 10 ? ("0" + _TIME6_START_MIN) : _TIME6_START_MIN)), 'HH:mm');
          this.paramForm.TIME6_OVER = [_TIME6_OVER_HOUR, _TIME6_OVER_MIN];
          this.paramForm.TIME6_REGION_ARR = this.parse1248(timeConf.TIME6_REGION ? Number(timeConf.TIME6_REGION) : 0);
          this.timeConfForm.TIME6_VALID = timeConf.TIME6_VALID ? Number(timeConf.TIME6_VALID) : 0;

          let _TIME7_START_HOUR = timeConf.TIME7_START_HOUR ? Number(timeConf.TIME7_START_HOUR) : 0,
            _TIME7_START_MIN = timeConf.TIME7_START_MIN ? Number(timeConf.TIME7_START_MIN) : 0,
            _TIME7_OVER_HOUR = timeConf.TIME7_OVER_HOUR ? Number(timeConf.TIME7_OVER_HOUR) : 0,
            _TIME7_OVER_MIN = timeConf.TIME7_OVER_MIN ? Number(timeConf.TIME7_OVER_MIN) : 0;
          this.paramForm.TIME7_START = dayjs(((_TIME7_START_HOUR < 10 ? ("0" + _TIME7_START_HOUR) : _TIME7_START_HOUR) + ":" +  (_TIME7_START_MIN < 10 ? ("0" + _TIME7_START_MIN) : _TIME7_START_MIN)), 'HH:mm');
          this.paramForm.TIME7_OVER = [_TIME7_OVER_HOUR, _TIME7_OVER_MIN];
          this.paramForm.TIME7_REGION_ARR = this.parse1248(timeConf.TIME7_REGION ? Number(timeConf.TIME7_REGION) : 0);
          this.timeConfForm.TIME7_VALID = timeConf.TIME7_VALID ? Number(timeConf.TIME7_VALID) : 0;

          let _TIME8_START_HOUR = timeConf.TIME8_START_HOUR ? Number(timeConf.TIME8_START_HOUR) : 0,
            _TIME8_START_MIN = timeConf.TIME8_START_MIN ? Number(timeConf.TIME8_START_MIN) : 0,
            _TIME8_OVER_HOUR = timeConf.TIME8_OVER_HOUR ? Number(timeConf.TIME8_OVER_HOUR) : 0,
            _TIME8_OVER_MIN = timeConf.TIME8_OVER_MIN ? Number(timeConf.TIME8_OVER_MIN) : 0;
          this.paramForm.TIME8_START = dayjs(((_TIME8_START_HOUR < 10 ? ("0" + _TIME8_START_HOUR) : _TIME8_START_HOUR) + ":" +  (_TIME8_START_MIN < 10 ? ("0" + _TIME8_START_MIN) : _TIME8_START_MIN)), 'HH:mm');
          this.paramForm.TIME8_OVER = [_TIME8_OVER_HOUR, _TIME8_OVER_MIN];
          this.paramForm.TIME8_REGION_ARR = this.parse1248(timeConf.TIME8_REGION ? Number(timeConf.TIME8_REGION) : 0);
          this.timeConfForm.TIME8_VALID = timeConf.TIME8_VALID ? Number(timeConf.TIME8_VALID) : 0;

          let _TIME9_START_HOUR = timeConf.TIME9_START_HOUR ? Number(timeConf.TIME9_START_HOUR) : 0,
            _TIME9_START_MIN = timeConf.TIME9_START_MIN ? Number(timeConf.TIME9_START_MIN) : 0,
            _TIME9_OVER_HOUR = timeConf.TIME9_OVER_HOUR ? Number(timeConf.TIME9_OVER_HOUR) : 0,
            _TIME9_OVER_MIN = timeConf.TIME9_OVER_MIN ? Number(timeConf.TIME9_OVER_MIN) : 0;
          this.paramForm.TIME9_START = dayjs(((_TIME9_START_HOUR < 10 ? ("0" + _TIME9_START_HOUR) : _TIME9_START_HOUR) + ":" +  (_TIME9_START_MIN < 10 ? ("0" + _TIME9_START_MIN) : _TIME9_START_MIN)), 'HH:mm');
          this.paramForm.TIME9_OVER = [_TIME9_OVER_HOUR, _TIME9_OVER_MIN];
          this.paramForm.TIME9_REGION_ARR = this.parse1248(timeConf.TIME9_REGION ? Number(timeConf.TIME9_REGION) : 0);
          this.timeConfForm.TIME9_VALID = timeConf.TIME9_VALID ? Number(timeConf.TIME9_VALID) : 0;

          let _TIME10_START_HOUR = timeConf.TIME10_START_HOUR ? Number(timeConf.TIME10_START_HOUR) : 0,
            _TIME10_START_MIN = timeConf.TIME10_START_MIN ? Number(timeConf.TIME10_START_MIN) : 0,
            _TIME10_OVER_HOUR = timeConf.TIME10_OVER_HOUR ? Number(timeConf.TIME10_OVER_HOUR) : 0,
            _TIME10_OVER_MIN = timeConf.TIME10_OVER_MIN ? Number(timeConf.TIME10_OVER_MIN) : 0;
          this.paramForm.TIME10_START = dayjs(((_TIME10_START_HOUR < 10 ? ("0" + _TIME10_START_HOUR) : _TIME10_START_HOUR) + ":" +  (_TIME10_START_MIN < 10 ? ("0" + _TIME10_START_MIN) : _TIME10_START_MIN)), 'HH:mm');
          this.paramForm.TIME10_OVER = [_TIME10_OVER_HOUR, _TIME10_OVER_MIN];
          this.paramForm.TIME10_REGION_ARR = this.parse1248(timeConf.TIME10_REGION ? Number(timeConf.TIME10_REGION) : 0);
          this.timeConfForm.TIME10_VALID = timeConf.TIME10_VALID ? Number(timeConf.TIME10_VALID) : 0;

          let _TIME11_START_HOUR = timeConf.TIME11_START_HOUR ? Number(timeConf.TIME11_START_HOUR) : 0,
            _TIME11_START_MIN = timeConf.TIME11_START_MIN ? Number(timeConf.TIME11_START_MIN) : 0,
            _TIME11_OVER_HOUR = timeConf.TIME11_OVER_HOUR ? Number(timeConf.TIME11_OVER_HOUR) : 0,
            _TIME11_OVER_MIN = timeConf.TIME11_OVER_MIN ? Number(timeConf.TIME11_OVER_MIN) : 0;
          this.paramForm.TIME11_START = dayjs(((_TIME11_START_HOUR < 10 ? ("0" + _TIME11_START_HOUR) : _TIME11_START_HOUR) + ":" +  (_TIME11_START_MIN < 10 ? ("0" + _TIME11_START_MIN) : _TIME11_START_MIN)), 'HH:mm');
          this.paramForm.TIME11_OVER = [_TIME11_OVER_HOUR, _TIME11_OVER_MIN];
          this.paramForm.TIME11_REGION_ARR = this.parse1248(timeConf.TIME11_REGION ? Number(timeConf.TIME11_REGION) : 0);
          this.timeConfForm.TIME11_VALID = timeConf.TIME11_VALID ? Number(timeConf.TIME11_VALID) : 0;

          let _TIME12_START_HOUR = timeConf.TIME12_START_HOUR ? Number(timeConf.TIME12_START_HOUR) : 0,
            _TIME12_START_MIN = timeConf.TIME12_START_MIN ? Number(timeConf.TIME12_START_MIN) : 0,
            _TIME12_OVER_HOUR = timeConf.TIME12_OVER_HOUR ? Number(timeConf.TIME12_OVER_HOUR) : 0,
            _TIME12_OVER_MIN = timeConf.TIME12_OVER_MIN ? Number(timeConf.TIME12_OVER_MIN) : 0;
          this.paramForm.TIME12_START = dayjs(((_TIME12_START_HOUR < 10 ? ("0" + _TIME12_START_HOUR) : _TIME12_START_HOUR) + ":" +  (_TIME12_START_MIN < 10 ? ("0" + _TIME12_START_MIN) : _TIME12_START_MIN)), 'HH:mm');
          this.paramForm.TIME12_OVER = [_TIME12_OVER_HOUR, _TIME12_OVER_MIN];
          this.paramForm.TIME12_REGION_ARR = this.parse1248(timeConf.TIME12_REGION ? Number(timeConf.TIME12_REGION) : 0);
          this.timeConfForm.TIME12_VALID = timeConf.TIME12_VALID ? Number(timeConf.TIME12_VALID) : 0;

          let _TIME13_START_HOUR = timeConf.TIME13_START_HOUR ? Number(timeConf.TIME13_START_HOUR) : 0,
            _TIME13_START_MIN = timeConf.TIME13_START_MIN ? Number(timeConf.TIME13_START_MIN) : 0,
            _TIME13_OVER_HOUR = timeConf.TIME13_OVER_HOUR ? Number(timeConf.TIME13_OVER_HOUR) : 0,
            _TIME13_OVER_MIN = timeConf.TIME13_OVER_MIN ? Number(timeConf.TIME13_OVER_MIN) : 0;
          this.paramForm.TIME13_START = dayjs(((_TIME13_START_HOUR < 10 ? ("0" + _TIME13_START_HOUR) : _TIME13_START_HOUR) + ":" +  (_TIME13_START_MIN < 10 ? ("0" + _TIME13_START_MIN) : _TIME13_START_MIN)), 'HH:mm');
          this.paramForm.TIME13_OVER = [_TIME13_OVER_HOUR, _TIME13_OVER_MIN];
          this.paramForm.TIME13_REGION_ARR = this.parse1248(timeConf.TIME13_REGION ? Number(timeConf.TIME13_REGION) : 0);
          this.timeConfForm.TIME13_VALID = timeConf.TIME13_VALID ? Number(timeConf.TIME13_VALID) : 0;

          let _TIME14_START_HOUR = timeConf.TIME14_START_HOUR ? Number(timeConf.TIME14_START_HOUR) : 0,
            _TIME14_START_MIN = timeConf.TIME14_START_MIN ? Number(timeConf.TIME14_START_MIN) : 0,
            _TIME14_OVER_HOUR = timeConf.TIME14_OVER_HOUR ? Number(timeConf.TIME14_OVER_HOUR) : 0,
            _TIME14_OVER_MIN = timeConf.TIME14_OVER_MIN ? Number(timeConf.TIME14_OVER_MIN) : 0;
          this.paramForm.TIME14_START = dayjs(((_TIME14_START_HOUR < 10 ? ("0" + _TIME14_START_HOUR) : _TIME14_START_HOUR) + ":" +  (_TIME14_START_MIN < 10 ? ("0" + _TIME14_START_MIN) : _TIME14_START_MIN)), 'HH:mm');
          this.paramForm.TIME14_OVER = [_TIME14_OVER_HOUR, _TIME14_OVER_MIN];
          this.paramForm.TIME14_REGION_ARR = this.parse1248(timeConf.TIME14_REGION ? Number(timeConf.TIME14_REGION) : 0);
          this.timeConfForm.TIME14_VALID = timeConf.TIME14_VALID ? Number(timeConf.TIME14_VALID) : 0;

          let _TIME15_START_HOUR = timeConf.TIME15_START_HOUR ? Number(timeConf.TIME15_START_HOUR) : 0,
            _TIME15_START_MIN = timeConf.TIME15_START_MIN ? Number(timeConf.TIME15_START_MIN) : 0,
            _TIME15_OVER_HOUR = timeConf.TIME15_OVER_HOUR ? Number(timeConf.TIME15_OVER_HOUR) : 0,
            _TIME15_OVER_MIN = timeConf.TIME15_OVER_MIN ? Number(timeConf.TIME15_OVER_MIN) : 0;
          this.paramForm.TIME15_START = dayjs(((_TIME15_START_HOUR < 10 ? ("0" + _TIME15_START_HOUR) : _TIME15_START_HOUR) + ":" +  (_TIME15_START_MIN < 10 ? ("0" + _TIME15_START_MIN) : _TIME15_START_MIN)), 'HH:mm');
          this.paramForm.TIME15_OVER = [_TIME15_OVER_HOUR, _TIME15_OVER_MIN];
          this.paramForm.TIME15_REGION_ARR = this.parse1248(timeConf.TIME15_REGION ? Number(timeConf.TIME15_REGION) : 0);
          this.timeConfForm.TIME15_VALID = timeConf.TIME15_VALID ? Number(timeConf.TIME15_VALID) : 0;

          let _TIME16_START_HOUR = timeConf.TIME16_START_HOUR ? Number(timeConf.TIME16_START_HOUR) : 0,
            _TIME16_START_MIN = timeConf.TIME16_START_MIN ? Number(timeConf.TIME16_START_MIN) : 0,
            _TIME16_OVER_HOUR = timeConf.TIME16_OVER_HOUR ? Number(timeConf.TIME16_OVER_HOUR) : 0,
            _TIME16_OVER_MIN = timeConf.TIME16_OVER_MIN ? Number(timeConf.TIME16_OVER_MIN) : 0;
          this.paramForm.TIME16_START = dayjs(((_TIME16_START_HOUR < 10 ? ("0" + _TIME16_START_HOUR) : _TIME16_START_HOUR) + ":" +  (_TIME16_START_MIN < 10 ? ("0" + _TIME16_START_MIN) : _TIME16_START_MIN)), 'HH:mm');
          this.paramForm.TIME16_OVER = [_TIME16_OVER_HOUR, _TIME16_OVER_MIN];
          this.paramForm.TIME16_REGION_ARR = this.parse1248(timeConf.TIME16_REGION ? Number(timeConf.TIME16_REGION) : 0);
          this.timeConfForm.TIME16_VALID = timeConf.TIME16_VALID ? Number(timeConf.TIME16_VALID) : 0;

          this.paramForm.tempModelConf = _conf.tempModelConf ? (JSON.parse(_conf.tempModelConf) || {}) : {};
          //转成数字
          this.paramForm.tempModelConf.TEMP1_VALID = this.paramForm.tempModelConf.TEMP1_VALID ? Number(this.paramForm.tempModelConf.TEMP1_VALID) : 0;
          this.paramForm.tempModelConf.TEMP2_VALID = this.paramForm.tempModelConf.TEMP2_VALID ? Number(this.paramForm.tempModelConf.TEMP2_VALID) : 0;
          this.paramForm.tempModelConf.TEMP3_VALID = this.paramForm.tempModelConf.TEMP3_VALID ? Number(this.paramForm.tempModelConf.TEMP3_VALID) : 0;
          this.paramForm.tempModelConf.TEMP4_VALID = this.paramForm.tempModelConf.TEMP4_VALID ? Number(this.paramForm.tempModelConf.TEMP4_VALID) : 0;
          this.paramForm.tempModelConf.TEMP5_VALID = this.paramForm.tempModelConf.TEMP5_VALID ? Number(this.paramForm.tempModelConf.TEMP5_VALID) : 0;
          this.paramForm.tempModelConf.TEMP6_VALID = this.paramForm.tempModelConf.TEMP6_VALID ? Number(this.paramForm.tempModelConf.TEMP6_VALID) : 0;
        }

        let super3TimeConf = Object.assign({}, (_conf.su3TimeModelConf ? (JSON.parse(_conf.su3TimeModelConf) || {}) : {}));
        this.super3TimeConfForm = super3TimeConf;
        if (super3TimeConf) {
          //{"SU_TIME1_START_HOUR":9,"SU_TIME1_START_MIN":30,"SU_TIME1_OVER_HOUR":23,"SU_TIME1_OVER_MIN":59,}
          let _SU2_TIME1_START_HOUR = super3TimeConf.SU_TIME1_START_HOUR ? Number(super3TimeConf.SU_TIME1_START_HOUR) : 0,
            _SU2_TIME1_START_MIN = super3TimeConf.SU_TIME1_START_MIN ? Number(super3TimeConf.SU_TIME1_START_MIN) : 0,
            _SU2_TIME1_OVER_HOUR = super3TimeConf.SU_TIME1_OVER_HOUR ? Number(super3TimeConf.SU_TIME1_OVER_HOUR) : 0,
            _SU2_TIME1_OVER_MIN = super3TimeConf.SU_TIME1_OVER_MIN ? Number(super3TimeConf.SU_TIME1_OVER_MIN) : 0;
          this.paramForm.SU2_TIME1_START = dayjs(((_SU2_TIME1_START_HOUR < 10 ? ("0" + _SU2_TIME1_START_HOUR) : _SU2_TIME1_START_HOUR) + ":" + (_SU2_TIME1_START_MIN < 10 ? ("0" + _SU2_TIME1_START_MIN) : _SU2_TIME1_START_MIN)), 'HH:mm');
          this.paramForm.SU2_TIME1_OVER = [_SU2_TIME1_OVER_HOUR, _SU2_TIME1_OVER_MIN];

          let _SU2_TIME2_START_HOUR = super3TimeConf.SU_TIME2_START_HOUR ? Number(super3TimeConf.SU_TIME2_START_HOUR) : 0,
            _SU2_TIME2_START_MIN = super3TimeConf.SU_TIME2_START_MIN ? Number(super3TimeConf.SU_TIME2_START_MIN) : 0,
            _SU2_TIME2_OVER_HOUR = super3TimeConf.SU_TIME2_OVER_HOUR ? Number(super3TimeConf.SU_TIME2_OVER_HOUR) : 0,
            _SU2_TIME2_OVER_MIN = super3TimeConf.SU_TIME2_OVER_MIN ? Number(super3TimeConf.SU_TIME2_OVER_MIN) : 0;
          this.paramForm.SU2_TIME2_START = dayjs(((_SU2_TIME2_START_HOUR < 10 ? ("0" + _SU2_TIME2_START_HOUR) : _SU2_TIME2_START_HOUR) + ":" + (_SU2_TIME2_START_MIN < 10 ? ("0" + _SU2_TIME2_START_MIN) : _SU2_TIME2_START_MIN)), 'HH:mm');
          this.paramForm.SU2_TIME2_OVER = [_SU2_TIME2_OVER_HOUR, _SU2_TIME2_OVER_MIN];

          let _SU2_TIME3_START_HOUR = super3TimeConf.SU_TIME3_START_HOUR ? Number(super3TimeConf.SU_TIME3_START_HOUR) : 0,
            _SU2_TIME3_START_MIN = super3TimeConf.SU_TIME3_START_MIN ? Number(super3TimeConf.SU_TIME3_START_MIN) : 0,
            _SU2_TIME3_OVER_HOUR = super3TimeConf.SU_TIME3_OVER_HOUR ? Number(super3TimeConf.SU_TIME3_OVER_HOUR) : 0,
            _SU2_TIME3_OVER_MIN = super3TimeConf.SU_TIME3_OVER_MIN ? Number(super3TimeConf.SU_TIME3_OVER_MIN) : 0;
          this.paramForm.SU2_TIME3_START = dayjs(((_SU2_TIME3_START_HOUR < 10 ? ("0" + _SU2_TIME3_START_HOUR) : _SU2_TIME3_START_HOUR) + ":" + (_SU2_TIME3_START_MIN < 10 ? ("0" + _SU2_TIME3_START_MIN) : _SU2_TIME3_START_MIN)), 'HH:mm');
          this.paramForm.SU2_TIME3_OVER = [_SU2_TIME3_OVER_HOUR, _SU2_TIME3_OVER_MIN];

          let _SU2_TIME4_START_HOUR = super3TimeConf.SU_TIME4_START_HOUR ? Number(super3TimeConf.SU_TIME4_START_HOUR) : 0,
            _SU2_TIME4_START_MIN = super3TimeConf.SU_TIME4_START_MIN ? Number(super3TimeConf.SU_TIME4_START_MIN) : 0,
            _SU2_TIME4_OVER_HOUR = super3TimeConf.SU_TIME4_OVER_HOUR ? Number(super3TimeConf.SU_TIME4_OVER_HOUR) : 0,
            _SU2_TIME4_OVER_MIN = super3TimeConf.SU_TIME4_OVER_MIN ? Number(super3TimeConf.SU_TIME4_OVER_MIN) : 0;
          this.paramForm.SU2_TIME4_START = dayjs(((_SU2_TIME4_START_HOUR < 10 ? ("0" + _SU2_TIME4_START_HOUR) : _SU2_TIME4_START_HOUR) + ":" + (_SU2_TIME4_START_MIN < 10 ? ("0" + _SU2_TIME4_START_MIN) : _SU2_TIME4_START_MIN)), 'HH:mm');
          this.paramForm.SU2_TIME4_OVER = [_SU2_TIME4_OVER_HOUR, _SU2_TIME4_OVER_MIN];
        }

      }
    },
    selectTime1Start(time) {
      this.timeConfForm.TIME1_START_HOUR = time.hour();
      this.timeConfForm.TIME1_START_MIN = time.minute();
    },
    selectTime2Start(time) {
      this.timeConfForm.TIME2_START_HOUR = time.hour();
      this.timeConfForm.TIME2_START_MIN = time.minute();
    },
    selectTime3Start(time) {
      this.timeConfForm.TIME3_START_HOUR = time.hour();
      this.timeConfForm.TIME3_START_MIN = time.minute();
    },
    selectTime4Start(time) {
      this.timeConfForm.TIME4_START_HOUR = time.hour();
      this.timeConfForm.TIME4_START_MIN = time.minute();
    },
    selectTime5Start(time) {
      this.timeConfForm.TIME5_START_HOUR = time.hour();
      this.timeConfForm.TIME5_START_MIN = time.minute();
    },
    selectTime6Start(time) {
      this.timeConfForm.TIME6_START_HOUR = time.hour();
      this.timeConfForm.TIME6_START_MIN = time.minute();
    },
    selectTime7Start(time) {
      this.timeConfForm.TIME7_START_HOUR = time.hour();
      this.timeConfForm.TIME7_START_MIN = time.minute();
    },
    selectTime8Start(time) {
      this.timeConfForm.TIME8_START_HOUR = time.hour();
      this.timeConfForm.TIME8_START_MIN = time.minute();
    },
    selectTime9Start(time) {
      this.timeConfForm.TIME9_START_HOUR = time.hour();
      this.timeConfForm.TIME9_START_MIN = time.minute();
    },
    selectTime10Start(time) {
      this.timeConfForm.TIME10_START_HOUR = time.hour();
      this.timeConfForm.TIME10_START_MIN = time.minute();
    },
    selectTime11Start(time) {
      this.timeConfForm.TIME11_START_HOUR = time.hour();
      this.timeConfForm.TIME11_START_MIN = time.minute();
    },
    selectTime12Start(time) {
      this.timeConfForm.TIME12_START_HOUR = time.hour();
      this.timeConfForm.TIME12_START_MIN = time.minute();
    },
    selectTime13Start(time) {
      this.timeConfForm.TIME13_START_HOUR = time.hour();
      this.timeConfForm.TIME13_START_MIN = time.minute();
    },
    selectTime14Start(time) {
      this.timeConfForm.TIME14_START_HOUR = time.hour();
      this.timeConfForm.TIME14_START_MIN = time.minute();
    },
    selectTime15Start(time) {
      this.timeConfForm.TIME15_START_HOUR = time.hour();
      this.timeConfForm.TIME15_START_MIN = time.minute();
    },
    selectTime16Start(time) {
      this.timeConfForm.TIME16_START_HOUR = time.hour();
      this.timeConfForm.TIME16_START_MIN = time.minute();
    },
    selectTime1Over(time) {
      this.paramForm.TIME1_OVER = time;
      if (time) {
        this.timeConfForm.TIME1_OVER_HOUR = time[0];
        this.timeConfForm.TIME1_OVER_MIN = time[1];
      }
    },
    selectTime2Over(time) {
      this.paramForm.TIME2_OVER = time;
      if (time) {
        this.timeConfForm.TIME2_OVER_HOUR = time[0];
        this.timeConfForm.TIME2_OVER_MIN = time[1];
      }
    },
    selectTime3Over(time) {
      this.paramForm.TIME3_OVER = time;
      if (time) {
        this.timeConfForm.TIME3_OVER_HOUR = time[0];
        this.timeConfForm.TIME3_OVER_MIN = time[1];
      }
    },
    selectTime4Over(time) {
      this.paramForm.TIME4_OVER = time;
      if (time) {
        this.timeConfForm.TIME4_OVER_HOUR = time[0];
        this.timeConfForm.TIME4_OVER_MIN = time[1];
      }
    },
    selectTime5Over(time) {
      this.paramForm.TIME5_OVER = time;
      if (time) {
        this.timeConfForm.TIME5_OVER_HOUR = time[0];
        this.timeConfForm.TIME5_OVER_MIN = time[1];
      }
    },
    selectTime6Over(time) {
      this.paramForm.TIME6_OVER = time;
      if (time) {
        this.timeConfForm.TIME6_OVER_HOUR = time[0];
        this.timeConfForm.TIME6_OVER_MIN = time[1];
      }
    },
    selectTime7Over(time) {
      this.paramForm.TIME7_OVER = time;
      if (time) {
        this.timeConfForm.TIME7_OVER_HOUR = time[0];
        this.timeConfForm.TIME7_OVER_MIN = time[1];
      }
    },
    selectTime8Over(time) {
      this.paramForm.TIME8_OVER = time;
      if (time) {
        this.timeConfForm.TIME8_OVER_HOUR = time[0];
        this.timeConfForm.TIME8_OVER_MIN = time[1];
      }
    },
    selectTime9Over(time) {
      this.paramForm.TIME9_OVER = time;
      if (time) {
        this.timeConfForm.TIME9_OVER_HOUR = time[0];
        this.timeConfForm.TIME9_OVER_MIN = time[1];
      }
    },
    selectTime10Over(time) {
      this.paramForm.TIME10_OVER = time;
      if (time) {
        this.timeConfForm.TIME10_OVER_HOUR = time[0];
        this.timeConfForm.TIME10_OVER_MIN = time[1];
      }
    },
    selectTime11Over(time) {
      this.paramForm.TIME11_OVER = time;
      if (time) {
        this.timeConfForm.TIME11_OVER_HOUR = time[0];
        this.timeConfForm.TIME11_OVER_MIN = time[1];
      }
    },
    selectTime12Over(time) {
      this.paramForm.TIME12_OVER = time;
      if (time) {
        this.timeConfForm.TIME12_OVER_HOUR = time[0];
        this.timeConfForm.TIME12_OVER_MIN = time[1];
      }
    },
    selectTime13Over(time) {
      this.paramForm.TIME13_OVER = time;
      if (time) {
        this.timeConfForm.TIME13_OVER_HOUR = time[0];
        this.timeConfForm.TIME13_OVER_MIN = time[1];
      }
    },
    selectTime14Over(time) {
      this.paramForm.TIME14_OVER = time;
      if (time) {
        this.timeConfForm.TIME14_OVER_HOUR = time[0];
        this.timeConfForm.TIME14_OVER_MIN = time[1];
      }
    },
    selectTime15Over(time) {
      this.paramForm.TIME15_OVER = time;
      if (time) {
        this.timeConfForm.TIME15_OVER_HOUR = time[0];
        this.timeConfForm.TIME15_OVER_MIN = time[1];
      }
    },
    selectTime16Over(time) {
      this.paramForm.TIME16_OVER = time;
      if (time) {
        this.timeConfForm.TIME16_OVER_HOUR = time[0];
        this.timeConfForm.TIME16_OVER_MIN = time[1];
      }
    },
    time1RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME1_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME1_REGION = zong;
      }
    },
    time2RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME2_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME2_REGION = zong;
      }
    },
    time3RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME3_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME3_REGION = zong;
      }
    },
    time4RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME4_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME4_REGION = zong;
      }
    },
    time5RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME5_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME5_REGION = zong;
      }
    },
    time6RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME6_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME6_REGION = zong;
      }
    },
    time7RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME7_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME7_REGION = zong;
      }
    },
    time8RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME8_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME8_REGION = zong;
      }
    },
    time9RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME9_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME9_REGION = zong;
      }
    },
    time10RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME10_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME10_REGION = zong;
      }
    },
    time11RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME11_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME11_REGION = zong;
      }
    },
    time12RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME12_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME12_REGION = zong;
      }
    },
    time13RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME13_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME13_REGION = zong;
      }
    },
    time14RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME14_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME14_REGION = zong;
      }
    },
    time15RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME15_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME15_REGION = zong;
      }
    },
    time16RegionChange(value) {
      if (!value || value.length == 0) {
        this.timeConfForm.TIME16_REGION = 0;
      } else {
        let zong = 0;
        for (let i = 0; i < value.length; i++) {
          zong = value[i] + zong;
        }
        this.timeConfForm.TIME16_REGION = zong;
      }
    },
    //喷淋二代 {"SU_TIME1_START_HOUR":9,"SU_TIME1_START_MIN":30,"SU_TIME1_OVER_HOUR":23,"SU_TIME1_OVER_MIN":59,}
    selectSU2Time1Start(time) {
      this.super3TimeConfForm.SU_TIME1_START_HOUR = time.hour();
      this.super3TimeConfForm.SU_TIME1_START_MIN = time.minute();
    },
    selectSU2Time2Start(time) {
      this.super3TimeConfForm.SU_TIME2_START_HOUR = time.hour();
      this.super3TimeConfForm.SU_TIME2_START_MIN = time.minute();
    },
    selectSU2Time3Start(time) {
      this.super3TimeConfForm.SU_TIME3_START_HOUR = time.hour();
      this.super3TimeConfForm.SU_TIME3_START_MIN = time.minute();
    },
    selectSU2Time4Start(time) {
      this.super3TimeConfForm.SU_TIME4_START_HOUR = time.hour();
      this.super3TimeConfForm.SU_TIME4_START_MIN = time.minute();
    },
    selectSU2Time1Over(time) {
      this.paramForm.SU2_TIME1_OVER = time;
      if (time) {
        this.super3TimeConfForm.SU_TIME1_OVER_HOUR = time[0];
        this.super3TimeConfForm.SU_TIME1_OVER_MIN = time[1];
      }
    },
    selectSU2Time2Over(time) {
      this.paramForm.SU2_TIME2_OVER = time;
      if (time) {
        this.super3TimeConfForm.SU_TIME2_OVER_HOUR = time[0];
        this.super3TimeConfForm.SU_TIME2_OVER_MIN = time[1];
      }
    },
    selectSU2Time3Over(time) {
      this.paramForm.SU2_TIME3_OVER = time;
      if (time) {
        this.super3TimeConfForm.SU_TIME3_OVER_HOUR = time[0];
        this.super3TimeConfForm.SU_TIME3_OVER_MIN = time[1];
      }
    },
    selectSU2Time4Over(time) {
      this.paramForm.SU2_TIME4_OVER = time;
      if (time) {
        this.super3TimeConfForm.SU_TIME4_OVER_HOUR = time[0];
        this.super3TimeConfForm.SU_TIME4_OVER_MIN = time[1];
      }
    },
    checkProcess(sceneDictate, clearCallback, callback) {
      let params = {
        recordId: this.data.recordId,
        sceneDictate: sceneDictate
      };
      let result = DeviceCommandDownQueueApi.workingDetail(params);
      result
        .then(result => {
          if (!result || !result.dcdqId) { //处理完成了
            clearCallback && clearCallback(); //去掉菊花+清除循环调用
            callback && callback(); //用户自定义
          }
        })
        .catch(() => {
          clearCallback && clearCallback(); //去掉菊花+清除循环调用
        });
    },

    //保存配置处理-----------begin
    clearConfigProcess(){
      this.iconLoading = false;
      clearInterval(this.loadTimer);
    },
    checkConfigProcess()
    {
      let that = this;
      this.checkProcess(9991, this.clearConfigProcess, function(){
        that.init();
      });
    },
    saveConfigToCmdQueue()
    {
      let workerDetailparams = {
        recordId: this.data.recordId,
        sceneDictate: 9991
      };
      let that = this;
      let existWorkerResult = DeviceCommandDownQueueApi.workingDetail2(workerDetailparams);
      existWorkerResult
        .then(workResult => {
          console.log(workResult);
          if (!workResult || !workResult.dcdqId) { //处理完成了
            that.save();
          } else {
            message.error('上一个配置还在推送中，请稍后重试');
            return;
          }
        })
        .catch((e) => {
          message.error(e);
        });
    },
    /**
     * 保存和编辑
     * 写到队列，队列发送完回写到原配置
     * @author cancan
     * @date 2022/03/04 21:15
     */
    save() {
      //将"结束时间"00：00转为24点吧。this.timeConfForm.TIME6_OVER_HOUR结束
      let timeModelConf = this.timeConfForm;
      if (this.timeConfForm.TIME1_VALID > 0 && !this.timeConfForm.TIME1_REGION) {
        message.error('时间段一必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME2_VALID > 0 && !this.timeConfForm.TIME2_REGION) {
        message.error('时间段二必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME3_VALID > 0 && !this.timeConfForm.TIME3_REGION) {
        message.error('时间段三必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME4_VALID > 0 && !this.timeConfForm.TIME4_REGION) {
        message.error('时间段四必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME5_VALID > 0 && !this.timeConfForm.TIME5_REGION) {
        message.error('时间段五必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME6_VALID > 0 && !this.timeConfForm.TIME6_REGION) {
        message.error('时间段六必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME7_VALID > 0 && !this.timeConfForm.TIME7_REGION) {
        message.error('时间段七必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME8_VALID > 0 && !this.timeConfForm.TIME8_REGION) {
        message.error('时间段八必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME9_VALID > 0 && !this.timeConfForm.TIME9_REGION) {
        message.error('时间段九必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME10_VALID > 0 && !this.timeConfForm.TIME10_REGION) {
        message.error('时间段十必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME11_VALID > 0 && !this.timeConfForm.TIME11_REGION) {
        message.error('时间段十一必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME12_VALID > 0 && !this.timeConfForm.TIME12_REGION) {
        message.error('时间段十二必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME13_VALID > 0 && !this.timeConfForm.TIME13_REGION) {
        message.error('时间段十三必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME14_VALID > 0 && !this.timeConfForm.TIME14_REGION) {
        message.error('时间段十四必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME15_VALID > 0 && !this.timeConfForm.TIME15_REGION) {
        message.error('时间段十五必须选择区域');
        return;
      }
      if (this.timeConfForm.TIME16_VALID > 0 && !this.timeConfForm.TIME16_REGION) {
        message.error('时间段十六必须选择区域');
        return;
      }


      if (this.timeConfForm.TIME1_VALID > 0 && (this.timeConfForm.TIME1_START_HOUR * 100 + this.timeConfForm.TIME1_START_MIN) > (this.timeConfForm.TIME1_OVER_HOUR * 100 + this.timeConfForm.TIME1_OVER_MIN)) {
        message.error('时间段一开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME2_VALID > 0 && (this.timeConfForm.TIME2_START_HOUR * 100 + this.timeConfForm.TIME2_START_MIN) > (this.timeConfForm.TIME2_OVER_HOUR * 100 + this.timeConfForm.TIME2_OVER_MIN)) {
        message.error('时间段二开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME3_VALID > 0 && (this.timeConfForm.TIME3_START_HOUR * 100 + this.timeConfForm.TIME3_START_MIN) > (this.timeConfForm.TIME3_OVER_HOUR * 100 + this.timeConfForm.TIME3_OVER_MIN)) {
        message.error('时间段三开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME4_VALID > 0 && (this.timeConfForm.TIME4_START_HOUR * 100 + this.timeConfForm.TIME4_START_MIN) > (this.timeConfForm.TIME4_OVER_HOUR * 100 + this.timeConfForm.TIME4_OVER_MIN)) {
        message.error('时间段四开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME5_VALID > 0 && (this.timeConfForm.TIME5_START_HOUR * 100 + this.timeConfForm.TIME5_START_MIN) > (this.timeConfForm.TIME5_OVER_HOUR * 100 + this.timeConfForm.TIME5_OVER_MIN)) {
        message.error('时间段五开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME6_VALID > 0 && (this.timeConfForm.TIME6_START_HOUR * 100 + this.timeConfForm.TIME6_START_MIN) > (this.timeConfForm.TIME6_OVER_HOUR * 100 + this.timeConfForm.TIME6_OVER_MIN)) {
        message.error('时间段六开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME7_VALID > 0 && (this.timeConfForm.TIME7_START_HOUR * 100 + this.timeConfForm.TIME7_START_MIN) > (this.timeConfForm.TIME7_OVER_HOUR * 100 + this.timeConfForm.TIME7_OVER_MIN)) {
        message.error('时间段七开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME8_VALID > 0 && (this.timeConfForm.TIME8_START_HOUR * 100 + this.timeConfForm.TIME8_START_MIN) > (this.timeConfForm.TIME8_OVER_HOUR * 100 + this.timeConfForm.TIME8_OVER_MIN)) {
        message.error('时间段八开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME9_VALID > 0 && (this.timeConfForm.TIME9_START_HOUR * 100 + this.timeConfForm.TIME9_START_MIN) > (this.timeConfForm.TIME9_OVER_HOUR * 100 + this.timeConfForm.TIME9_OVER_MIN)) {
        message.error('时间段九开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME10_VALID > 0 && (this.timeConfForm.TIME10_START_HOUR * 100 + this.timeConfForm.TIME10_START_MIN) > (this.timeConfForm.TIME10_OVER_HOUR * 100 + this.timeConfForm.TIME10_OVER_MIN)) {
        message.error('时间段十开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME11_VALID > 0 && (this.timeConfForm.TIME11_START_HOUR * 100 + this.timeConfForm.TIME11_START_MIN) > (this.timeConfForm.TIME11_OVER_HOUR * 100 + this.timeConfForm.TIME11_OVER_MIN)) {
        message.error('时间段十一开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME12_VALID > 0 && (this.timeConfForm.TIME12_START_HOUR * 100 + this.timeConfForm.TIME12_START_MIN) > (this.timeConfForm.TIME12_OVER_HOUR * 100 + this.timeConfForm.TIME12_OVER_MIN)) {
        message.error('时间段十二开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME13_VALID > 0 && (this.timeConfForm.TIME13_START_HOUR * 100 + this.timeConfForm.TIME13_START_MIN) > (this.timeConfForm.TIME13_OVER_HOUR * 100 + this.timeConfForm.TIME13_OVER_MIN)) {
        message.error('时间段十三开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME14_VALID > 0 && (this.timeConfForm.TIME14_START_HOUR * 100 + this.timeConfForm.TIME14_START_MIN) > (this.timeConfForm.TIME14_OVER_HOUR * 100 + this.timeConfForm.TIME14_OVER_MIN)) {
        message.error('时间段十四开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME15_VALID > 0 && (this.timeConfForm.TIME15_START_HOUR * 100 + this.timeConfForm.TIME15_START_MIN) > (this.timeConfForm.TIME15_OVER_HOUR * 100 + this.timeConfForm.TIME15_OVER_MIN)) {
        message.error('时间段十五开始时间应小于结束时间，请重新输入');
        return;
      }
      if (this.timeConfForm.TIME16_VALID > 0 && (this.timeConfForm.TIME16_START_HOUR * 100 + this.timeConfForm.TIME16_START_MIN) > (this.timeConfForm.TIME16_OVER_HOUR * 100 + this.timeConfForm.TIME16_OVER_MIN)) {
        message.error('时间段十六开始时间应小于结束时间，请重新输入');
        return;
      }

      if (this.paramForm.tempModelConf.TEMP6_VALID > 0 && this.paramForm.tempModelConf.TEMP1_RANGE_LOW > this.paramForm.tempModelConf.TEMP1_RANGE_HIGH) {
        message.error('温度下限1需小于温度上限1，请重新输入');
        return;
      }
      if (this.paramForm.tempModelConf.TEMP2_VALID > 0 && this.paramForm.tempModelConf.TEMP2_RANGE_LOW > this.paramForm.tempModelConf.TEMP2_RANGE_HIGH) {
        message.error('温度下限2需小于温度上限2，请重新输入');
        return;
      }
      if (this.paramForm.tempModelConf.TEMP3_VALID > 0 && this.paramForm.tempModelConf.TEMP3_RANGE_LOW > this.paramForm.tempModelConf.TEMP3_RANGE_HIGH) {
        message.error('温度下限3需小于温度上限3，请重新输入');
        return;
      }
      if (this.paramForm.tempModelConf.TEMP4_VALID > 0 && this.paramForm.tempModelConf.TEMP4_RANGE_LOW > this.paramForm.tempModelConf.TEMP4_RANGE_HIGH) {
        message.error('温度下限4需小于温度上限4，请重新输入');
        return;
      }
      if (this.paramForm.tempModelConf.TEMP5_VALID > 0 && this.paramForm.tempModelConf.TEMP5_RANGE_LOW > this.paramForm.tempModelConf.TEMP5_RANGE_HIGH) {
        message.error('温度下限5需小于温度上限5，请重新输入');
        return;
      }
      if (this.paramForm.tempModelConf.TEMP6_VALID > 0 && this.paramForm.tempModelConf.TEMP6_RANGE_LOW > this.paramForm.tempModelConf.TEMP6_RANGE_HIGH) {
        message.error('温度下限6需小于温度上限6，请重新输入');
        return;
      }
      if (this.data.clientInnerType == 3) { //喷淋二代
        if ((this.super3TimeConfForm.SU_TIME1_START_HOUR * 100 + this.super3TimeConfForm.SU_TIME1_START_MIN) > (this.super3TimeConfForm.SU_TIME1_OVER_HOUR * 100 + this.super3TimeConfForm.SU_TIME1_OVER_MIN)) {
          message.error('超级模式2时间段一开始时间应小于结束时间，请重新输入');
          return;
        }
        if ((this.super3TimeConfForm.SU_TIME2_START_HOUR * 100 + this.super3TimeConfForm.SU_TIME2_START_MIN) > (this.super3TimeConfForm.SU_TIME2_OVER_HOUR * 100 + this.super3TimeConfForm.SU_TIME2_OVER_MIN)) {
          message.error('超级模式2时间段二开始时间应小于结束时间，请重新输入');
          return;
        }
        if ((this.super3TimeConfForm.SU_TIME3_START_HOUR * 100 + this.super3TimeConfForm.SU_TIME3_START_MIN) > (this.super3TimeConfForm.SU_TIME3_OVER_HOUR * 100 + this.super3TimeConfForm.SU_TIME3_OVER_MIN)) {
          message.error('超级模式2时间段三开始时间应小于结束时间，请重新输入');
          return;
        }
        if ((this.super3TimeConfForm.SU_TIME4_START_HOUR * 100 + this.super3TimeConfForm.SU_TIME4_START_MIN) > (this.super3TimeConfForm.SU_TIME4_OVER_HOUR * 100 + this.super3TimeConfForm.SU_TIME4_OVER_MIN)) {
          message.error('超级模式2时间段三开始时间应小于结束时间，请重新输入');
          return;
        }
      }
      console.log(timeModelConf);
      let updateData = {
        timeModelConf : JSON.stringify(timeModelConf),
        sprayModelData : JSON.stringify(this.paramForm.sprayModelData),
        tempModelConf : JSON.stringify(this.paramForm.tempModelConf),
        su3TimeModelConf : JSON.stringify(this.super3TimeConfForm),
        recordId : this.form.recordId
      };
      // 校验表单
      //await this.$refs.form.validate();
      // 修改加载框为正在加载
      this.loading = true;
      let updateDataRecord = {
        recordId: this.data.recordId,
        templateCode: 'sprayctocabinet',
        updateData : JSON.stringify({old : this.form, update : updateData}),
        dictate : 9991,
        sceneDictate : 9991
      };

      let result = DeviceCommandDownQueueApi.add(updateDataRecord);
      result.then(res => {
        // 移除加载框
        this.loading = false;
        // 提示添加成功
        message.success(res.message);

        this.iconLoading = true; //转圈
        this.loadTimer = setInterval(this.checkConfigProcess, 5000);
      })
        .catch(() => {
          this.loading = false;
        });
    },
    //保存配置吹--------------end


    //获取配置begin---------------
    clearGetParamsProcess(){
      this.getParamsLoading = false;
      clearInterval(this.getParamsTimer);
    },
    checkGetParamsProcess()
    {
      let that = this;
      this.checkProcess(56, this.clearGetParamsProcess, function(){
        that.init();
      });
    },
    getParamsActionToCmdQueue()
    {
      let workerDetailparams = {
        recordId: this.data.recordId,
        sceneDictate: 56
      };
      let that = this;
      let existWorkerResult = DeviceCommandDownQueueApi.workingDetail2(workerDetailparams);
      existWorkerResult
        .then(workResult => {
          console.log(workResult);
          if (!workResult || !workResult.dcdqId) { //处理完成了
            that.getParams();
          } else {
            message.error('上一个配置还在推送中，请稍后重试');
            return;
          }
        })
        .catch((e) => {
          message.error(e);
        });
    },
    getParams() { //读取配置
      this.loading = true;
      let updateData = {
        old: '',
        update: '',
      };
      let updateDataRecord = {
        recordId: this.data.recordId,
        templateCode: 'sprayctocabinet',
        updateData: JSON.stringify(updateData),
        dictate : 56,
        sceneDictate : 56
      };

      let result = DeviceCommandDownQueueApi.add(updateDataRecord);
      result
        .then(result => {
          // 移除加载框
          this.loading = false;
          // 提示添加成功
          message.success(result.message);

          this.getParamsLoading = true; //转圈
          this.getParamsTimer = setInterval(this.checkGetParamsProcess, 5000);
        })
        .catch(() => {
          this.loading = false;
        });
    },
    //获取配置end----------------
  }
};
</script>
<style scoped>
/** 用户卡片 */
.workplace-user-card .ele-cell-content {
  overflow: hidden;
}

.workplace-user-card h4 {
  margin-bottom: 6px;
}
.regionclass /deep/ .ant-col-md-11 {
  max-width : 30% !important;
}
.regionclass /deep/ .ant-col-md-13 {
  max-width: 70% !important;
}
</style>
